#ifndef _PRESENTER_HPP_
#define _PRESENTER_HPP_

#include <string>
#include <optional>

#include <DotSort/GameRules/TubeSet.hpp>
#include <DotSort/TubeSetBuilder.hpp>

#include <DotSort/View/IView.hpp>

class Presenter
{
	private:
		View::IView* view;

	public:
		Presenter(View::IView* view, TubeSetBuilder* builder);
		~Presenter();

		TubeSetBuilder* builder;
		TubeSet* tubeSet;

		std::optional<uint8_t> selectedTube = std::nullopt;

		void onClick(std::optional<uint8_t> tubeIndex);
		void onReload();
		void onLevelChange(TubeSetBuilder* builder);

		const std::vector<uint8_t>& getDots(uint8_t tubeIndex) const;
};

#endif
